namespace Peninsula.DataAccess.EF.SqlServer.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class _002 : DbMigration
    {
        public override void Up()
        {
            AddColumn("dbo.Admin", "StoreMangerId", c => c.String(maxLength: 50));
            AddColumn("dbo.Admin", "MaintenanceStafId", c => c.String(maxLength: 50));
            CreateIndex("dbo.Admin", "StoreMangerId");
            CreateIndex("dbo.Admin", "MaintenanceStafId");
            AddForeignKey("dbo.Admin", "MaintenanceStafId", "dbo.MaintenanceStaff", "Id");
            AddForeignKey("dbo.Admin", "StoreMangerId", "dbo.StoreManger", "Id");
        }
        
        public override void Down()
        {
            DropForeignKey("dbo.Admin", "StoreMangerId", "dbo.StoreManger");
            DropForeignKey("dbo.Admin", "MaintenanceStafId", "dbo.MaintenanceStaff");
            DropIndex("dbo.Admin", new[] { "MaintenanceStafId" });
            DropIndex("dbo.Admin", new[] { "StoreMangerId" });
            DropColumn("dbo.Admin", "MaintenanceStafId");
            DropColumn("dbo.Admin", "StoreMangerId");
        }
    }
}
